<?php
/*require_once("auth/sso.php");
$sso = new SingleSignOn_Broker();
$users = $sso->getInfo();

if (!$users) {
    header("Location:login.php", true, 307);
    exit;
}*/
$users["identity"]=2;
$user_active = $users["identity"];
require_once('user_assets.php');

$vehicle_role = $privilege->getVehicleRole($_GET['id'], $user->company_alias);
$features = $privilege->getFeatures($user->role_id,1);

require_once('app_common.php');
?>

<html lang="en">
   <head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Autogator</title>
        <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script> 
         <script type="text/javascript" src="lib/jquery-1.7.1.min.js"></script>
        <script type="text/javascript" src="jquery.lightbox-0.5.js"></script>
		<link rel="stylesheet" type="text/css" href="jquery.lightbox-0.5.css" media="screen" />	
		<script type="text/javascript" src="lib/jquery.ui.core.js"></script>
		<script type="text/javascript" src="lib/jquery.ui.widget.js"></script>
        <script type="text/javascript" src="js/slider.js"></script>

		<script type="text/javascript" src="lib/objs-2.1.1-min.js"></script>

		<script type="text/javascript" src="lib/puremvc-objs-2.0-min.js"></script>

		<script type="text/javascript" src="src/abc/MediatorNames.js"></script>

		<script type="text/javascript" src="src/abc/NotificationNames.js"></script>

		<script type="text/javascript" src="src/abc/ProxyNames.js"></script>

        <script type="text/javascript" src="src/abc/AppConstant.js"></script>

		<script type="text/javascript" src="src/controller/PrepModelCommand.js"></script>

		<script type="text/javascript" src="src/controller/PrepViewCommand.js"></script>

		<script type="text/javascript" src="src/controller/StartupCommand.js"></script>
        

        <script type="text/javascript" src="src/model/VehicleProxy.js"></script>

        <script type="text/javascript" src="src/model/InitialAssetsProxy.js"></script>
        
        <!-- Freecarbids.com application VOs -->

        <script type="text/javascript" src="src/model/vo/VehicleVO.js"></script>

        <script type="text/javascript" src="src/model/vo/PartnerVO.js"></script>

        <script type="text/javascript" src="src/model/vo/ReminderVO.js"></script>
		

	    <script type="text/javascript" src="src/view/components/UiComponent.js"></script>

		<script type="text/javascript" src="src/view/components/HomePage.js"></script>

        <script type="text/javascript" src="src/view/components/DetailPage.js"></script>

        <script type="text/javascript" src="src/view/components/ListPage.js"></script>

        <script type="text/javascript" src="src/view/components/MapPage.js"></script>
        

        <script type="text/javascript" src="src/view/components/AllInfoPage.js"></script>

        <script type="text/javascript" src="src/view/components/VehicleInfoPage.js"></script> 

        <script type="text/javascript" src="src/view/components/ContactInfoPage.js"></script>

        <script type="text/javascript" src="src/view/components/LocationInfoPage.js"></script> 

        <script type="text/javascript" src="src/view/components/CommentInfoPage.js"></script>

        <script type="text/javascript" src="src/view/components/PriceInfoPage.js"></script>
	 	

	    <script type="text/javascript" src="src/view/HomePageMediator.js"></script>

	  	<script type="text/javascript" src="src/view/DetailPageMediator.js"></script>

        <script type="text/javascript" src="src/view/ListPageMediator.js"></script>

        <script type="text/javascript" src="src/view/MapPageMediator.js"></script>
        

        <script type="text/javascript" src="src/view/AllInfoMediator.js"></script>

        <script type="text/javascript" src="src/view/VehicleInfoMediator.js"></script> 

        <script type="text/javascript" src="src/view/ContactInfoMediator.js"></script>

        <script type="text/javascript" src="src/view/LocationInfoMediator.js"></script> 

        <script type="text/javascript" src="src/view/CommentInfoMediator.js"></script>

        <script type="text/javascript" src="src/view/PriceInfoMediator.js"></script> 
        

		<script type="text/javascript" src="src/ApplicationFacade.js"></script>
       
       	<!-- fcb application layout code -->

        <script type="text/javascript" src="js/jquery.ui.all.js"></script>
  
        <script type="text/javascript" src="js/jquery.layout.js"></script>	

        <script type="text/javascript" src="js/script.js"></script>	

		<script type="text/javascript" src="js/jquery.color.js"></script>

        <script type="text/javascript" src="js/anim-script.js"></script>
        
       <script src="http://code.highcharts.com/highcharts.js"></script> 
       <script src="http://code.highcharts.com/modules/exporting.js"></script> 

	<link href="css/application.css" media="screen" rel="stylesheet" type="text/css">
	<!-- <link href="css/datepicker.css" media="screen" rel="stylesheet" type="text/css"> -->
	<link href="css/dashboards.css" media="screen" rel="stylesheet" type="text/css">
	 <link href="css/style.css" media="screen" rel="stylesheet" type="text/css"> 





<script type="text/javascript">
      	
  global_user.vehicle_role = "<?php echo $vehicle_role ?>";      
        
$().ready(function()
 {     
 

 	
 	 $(".container").hide();          
  $("div#root").removeClass("hidden");
   $("#statuschange").hide();

   if( document.location.hash )
	document.location.hash = "";
	var applicationFacade/*ApplicationFacade*/ = ApplicationFacade.getInstance();
        applicationFacade.startup( $("body") );
         
 }); 
         
   	 function getUrlVars() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
        vars[key] = value;
    });
    return vars;
} 
    
                                       
                            
		</script>
                <style type="text/css">
                  .default-loader{    
                    position: relative;
                    top: 50%;
                    left: 50%;
                    margin: 100px 0;
                    z-index: 102;
                    width: 150px;
                    height: 60px;
                    text-align: center;
                    font-size: 1.5em;
                   
                  } 
                  .nav-tabs > .active > a{
                      
                      background-color: #FAFAFA !important;
                  } 
                </style>   
                
    <!-- / fim dos arquivos utilizados pelo jQuery lightBox plugin -->
    
    <!-- Ativando o jQuery lightBox plugin -->
    <script type="text/javascript">
    $(function() {
      
    });
    </script>
   	<style type="text/css">
	/* jQuery lightBox plugin - Gallery style */
	#gallery {
		
	}
	#gallery ul { list-style: none; }
	#gallery ul li { display: inline; }
	#gallery ul img {
		
	}
	#gallery ul a:hover img {
		
	}
	#gallery ul a:hover { color: #fff; }
	</style>  
	 
     <script src="js/bootstrap-twipsy.js"></script>
   <!--  <script src="js/bootstrap-datepicker.js"></script> -->
    <script src="js/bootstrap.min.js"></script>
     <script type="text/javascript" src="lib/bootbox.min.js"></script>
					   
					     <script type="text/javascript" src="lib/confirm-simple.js"></script>
    <script type="text/javascript"> current_page = "view_page";</script>  
</head>

<body >
	
   <!--  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> -->
   
	<div id="root" class="hidden">
		<div id="wrapper">
                            <?php include_once $header_path; ?>
			<div id="content">
				<div class="container">
                                    <div id="no-vehicle" class="form-actions" style=" text-align: center; display: none;">
                                        <h3>You are not allowed to see the vehicle</h3>
                                        <br/>
                                        <a href="vehicle_list.php" class="btn btn-primary">Go back to vehicle list</a>
                                    </div>
                           <div id="vehicle-content-info" style="background-color:#f2f2f2;">
                                            <!-- =============================================================================== -->
                                            <!-- ================================== Vehivle detail View ======================== -->
                                            <!-- =============================================================================== -->
                                    <div class="section">
                                        <div class="section-header"><h3><div id="vehicle-idmakemodel" class="pull-left">Add New Vehicle</div></h3>
                                        
                                            <div class="btn-group pull-right" style="margin-top: 10px;">

                                           <!-- <a class="btn btn-mini dropdown-toggle" data-toggle="dropdown" href="#"><i class="icon-cog"></i><span class="caret"></span></a><ul class="dropdown-menu pull-right"><li><a href="" data-toggle="modal" data-target="#watchlist-modal"><i class="icon-eye-open"></i>&nbsp;&nbsp;Add Watchlist</a></li><li><a href="#"><i class="icon-share"></i>&nbsp;&nbsp;Share</a></li><li><a href="#"><i class="icon-print"></i>&nbsp;&nbsp;Print</a></li><li><a href="#"><i class="icon-list-alt"></i>&nbsp;&nbsp;Create Receipt</a></li></ul> -->
                                                <a target="blank" href="print-page.php?id=<?php echo $_GET["id"]; ?>" class="btn" id="print-viewpage">Print Details&nbsp;&nbsp;<i class="icon-print"></i></a>     
                                            </div>   
                                        </div>
                                        <div class="section-body">
                                            <!-- Start Vehicle Info Title -->
                                            <div id="vehicle-info-title" style="display: none;" >
                                            <div  class="row-fluid">
                                            <div class="span2 ac">
                                                <a href="#" class="thumbnail" style="width:90px; height: 92px;"><img id="view-title-image" src="images/no-photo-placeholder.png" style="width:90px; height:92px;" >
                                            </a>
                                            </div>
                                            <div class="span10">
                                                <div class="row-fluid">
                                                <div class="span4">
                                                <div class="stat-block">
                                                <h6 class="stat-heading">Year / Make / Model</h6>
                                                <h3 id="vehicle-yearmakemodel"></h3>

                                                </div>
                                                </div>
                                                <div class="span4">
                                                <div class="stat-block">
                                                <h6 class="stat-heading">Caller Name</h6>
                                                <h3 id="vehicle-caller-name"></h3>

                                                </div>
                                                </div>
                                                <div class="span4">
                                                <div class="stat-block">
                                                    <h6 class="stat-heading" >Remove By</h6>
                                                    <h3 id="vehicle-remove_by"></h3>
                                                </div>
                                                </div>
                                                </div>
                                                    <div class="row-fluid">
                                                        <div class="span4">
                                                            <div class="stat-block">
                                                            <h6 class="stat-heading">City / State</h6>
                                                            <h3 id="vehicle-citystate"></h3>

                                                            </div>
                                                        </div>
                                                        <div class="span4">
                                                            <div class="stat-block">
                                                            <h6 class="stat-heading">Phone Number</h6>
                                                            <h3 id="vehicle-phone"></h3>

                                                            </div>
                                                        </div>
                                                        <div class="span4" >
                                                            <div  class="stat-block" style="width:150px;float:left;">
                                                             <div class="btn-group">
                                                                <a id="btn_towstatus" class="btn btn-primary" href="#">New Vehicle</a>
                                                                <button class="btn btn-primary dropdown-toggle" style="padding-top:11px;"  data-toggle="dropdown" type="button"><span class="caret"></span></button>
                                                                <ul id="status-btn"class="dropdown-menu">
                                                                    <li id="btn_towstatus_new"><a href="#" ><i class="icon-inbox"></i>&nbsp;&nbsp;New Vehicle</a></li>
                                                                    <li id="btn_towstatus_scheduled"><a href="#" ><i class="icon-calendar"></i>&nbsp;&nbsp;Scheduled</a></li>
                                                                    <li id="btn_towstatus_pickedup"><a href="#" ><i class="icon-shopping-cart"></i>&nbsp;&nbsp;Picked up</a></li>
                                                                    <li id="btn_towstatus_delivered"><a href="#" ><i class="icon-check"></i>&nbsp;&nbsp;Delivered</a></li>
                                                                    <li id="btn_towstatus_unabletocontact"><a href="#" ><i class="icon-eye-close"></i>&nbsp;&nbsp;Unable to Contact</a></li>
                                                                    <li id="btn_towstatus_cancelled"><a href="#" ><i class="icon-remove"></i>&nbsp;&nbsp;Cancelled</a></li>
                                                                     
                                                                  
                                                                 </ul>
                                                              </div>   
                                                                

                                                            </div>
																<div class="bar" style="width:100%;"></div>
															</div>
                                                        </div>
                                                    </div>
                                                    <div class="row-fluid">
                                                        <div class="span4"></div>
                                                        <div class="span4"></div>
                                                        <div class="span4">
                                                            
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>

                                          
                                           
                                          
                                            <!--End Vehicle  info Title -->
                                             <ul class="nav nav-tabs" >
                                                  <li id="all-view-details"><a href="#">All Info</a></li>
                                                  <li id="vehicle-view-details"><a href="#">Vehicle Info</a></li>
                                                  <li id="contact-view-details"><a href="#">Contact Info</a></li>
                                                  <li id="location-view-details"><a href="#">Location Info</a></li>
                                             </ul>   
                                            <hr style="  margin-left: -15px; margin-right: -15px; margin-top: -19px;">
                                            <div id="info-nav">
                                                <div class="slider">
                                                    <!-- =============================================================================== -->
                                                    <!-- ================================== All Info =================================== -->
                                                    <!-- =============================================================================== -->
                                                    <div id="all-info-content" ></div>
                                                    <!-- =============================================================================== -->
                                                    <!-- ================================== Vehicle Info =============================== -->
                                                    <!-- =============================================================================== -->
                                                    <div id="vehicle-info-content"></div>
                                                    <!-- =============================================================================== -->
                                                    <!-- ================================== Contact Info =============================== -->
                                                    <!-- =============================================================================== -->
                                                    <div id="contact-info-content"></div>
                                                    <!-- =============================================================================== -->
                                                    <!-- ================================== Vehicle Location Info ====================== -->
                                                    <!-- =============================================================================== -->
                                                    <div id="location-info-content"></div>
                                                    <!-- =============================================================================== -->
                                                    <!-- ================================== Comment Info =============================== -->
                                                    <!-- =============================================================================== -->
                                                    <div id="comment-info-content"></div>
                                                    <!-- =============================================================================== -->
                                                    <!-- ================================== Vehicle Location Info ====================== -->
                                                    <!-- =============================================================================== -->
                                                    <div id="tow-info-content"></div>
                                                    <!-- =============================================================================== -->
                                                    <!-- ================================== Price Info ================================= -->
                                                    <!-- =============================================================================== -->
                                                    <div id="price-info-content"></div>
                                                </div>
                                            </div>
                                            <div class="form-actions" style="text-align: right;">
                                                
                                                <button class="btn btn-primary" id="cancel-info-btn" data-dismiss="modal" aria-hidden="true">Cancel</button>
                                           </div>   
                                        </div>
                                      </div>
                                    </div>
                                 </div>          
             </div>
         
        
      </div>   
   </div>
  <?php require_once 'popup_modals/watchlist-modal.php';   ?> 
  <?php require_once 'popup_modals/privatenote-modal.php';   ?> 
  <?php require_once 'popup_modals/correspondence-modal.php';   ?> 
    <?php require_once 'popup_modals/message-modal.php';   ?> 
     <?php require_once 'popup_modals/share-modal.php';   ?> 
    
 <!-- <footer id="footer">
				<div class="container">
					<div class="row">
						<div class="span5">

						</div>
						<div class="span5">

						</div>
						<div class="span2">

						</div>
					</div>
				</div>
		</footer> -->  
						<div id="statuschange" class="alert alert-success" style="position:absolute;top:67px;left:500px;width:300px;text-align:center;"></div>
	 					
			<div align="center" style="position:absolute;top:45%;left:40%;width:20%;"  id="progressviewpage">
				<div style="font-size: 17px;">Loading...</div>
				<div   class="progress progress-striped active">
																<div class="bar" style="width:100%;"></div>
															</div>   
											
			</div>   
</body>
</html>